#ifndef __M24C02_H
#define __M24C02_H

#include "gd32f10x.h"

#define M24C02_WRITE_ADDR		0xA0			/* 写操作地址 */
#define M24C02_READ_ADDR		0xA1			/* 读操作地址 */

void M24C02_init(void);
uint8_t M24C02_write_byte(uint8_t addr, uint8_t byte);
uint8_t M24C02_write_page(uint8_t addr, uint8_t *byte);
uint8_t M24C02_read_byte(uint8_t addr, uint8_t *byte, uint16_t len);

#endif
